Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds Bot typing in intent middleware, tracks last reply markup in MockMessageManager and updates show_message behavior, and adds an end-to-end test that exercises a reply-keyboard button click and validates bot context on the resulting callback. ChangesReply keyboard intent routing
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/aiogram_dialog/test_tools/mock_message_manager.py`:
- Around line 63-65: In MockMessageManager, reset_history() currently doesn't
clear self.last_reply_markup which allows stale keyboard markup to persist
across tests; update reset_history() to explicitly set self.last_reply_markup =
None (alongside existing history clears) so that the mock keyboard state is
reset when reset_history() is called.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 6418569e-6acd-425d-bf82-071849e168a1
📒 Files selected for processing (3)
src/aiogram_dialog/context/intent_middleware.pysrc/aiogram_dialog/test_tools/mock_message_manager.pytests/test_reply_keyboard.py
Description
This PR fixes an issue where
callback.message.botwas missing forReplyCallbackQueryobjects from reply keyboards.Previously, the simulated message object lacked the associated
Botinstance due to a missing.as_(bot)call, causing errors when accessingcallback.message.botin handlers.Now, the message is correctly linked to the
Botinstance, ensuring proper context for reply keyboard callbacksSummary by CodeRabbit
Tests
Bug Fixes